import React, { Component } from 'react';
import TabItem from './TabItem';

export default class Tab extends Component {
  render() {
    let { list } = this.props;
    console.log('list', list);
    return (
      <div>
        {Object.keys(list).map((type, i) => {
          return <div key={i} className="row">
            <div className="left">
              <span className="tab">{type}</span>
            </div>
            <div className="right">
              {list[type].map((v, j) => {
                return <TabItem {...this.props} item={v} key={j}></TabItem>
              })}
            </div>
            <div style={{ clear: "both" }}></div>
          </div>
        })}
      </div>
    )
  }
}
